package com.ftg.learn.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 行为日志表
 * </p>
 *
 * @author kangjx
 * @since 2023-05-05
 */
@TableName("sys_log")
@ApiModel(value = "Log对象", description = "行为日志表")
public class Log implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("日志主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("模块")
    private String logModule;

    @ApiModelProperty("请求方式")
    private String logMethod;

    @ApiModelProperty("接口")
    private String logApi;

    @ApiModelProperty("浏览器")
    private String logBrowser;

    @ApiModelProperty("操作地址")
    private String logIp;

    @ApiModelProperty("操作系统")
    private String logSystem;

    @ApiModelProperty("操作人")
    private LocalDateTime logOperator;

    @ApiModelProperty("访问(0代表成功,1代表失败)")
    private Byte logStatus;

    @ApiModelProperty("日志创建时间(访问时间)")
    private LocalDateTime gmtCreate;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLogModule() {
        return logModule;
    }

    public void setLogModule(String logModule) {
        this.logModule = logModule;
    }

    public String getLogMethod() {
        return logMethod;
    }

    public void setLogMethod(String logMethod) {
        this.logMethod = logMethod;
    }

    public String getLogApi() {
        return logApi;
    }

    public void setLogApi(String logApi) {
        this.logApi = logApi;
    }

    public String getLogBrowser() {
        return logBrowser;
    }

    public void setLogBrowser(String logBrowser) {
        this.logBrowser = logBrowser;
    }

    public String getLogIp() {
        return logIp;
    }

    public void setLogIp(String logIp) {
        this.logIp = logIp;
    }

    public String getLogSystem() {
        return logSystem;
    }

    public void setLogSystem(String logSystem) {
        this.logSystem = logSystem;
    }

    public LocalDateTime getLogOperator() {
        return logOperator;
    }

    public void setLogOperator(LocalDateTime logOperator) {
        this.logOperator = logOperator;
    }

    public Byte getLogStatus() {
        return logStatus;
    }

    public void setLogStatus(Byte logStatus) {
        this.logStatus = logStatus;
    }

    public LocalDateTime getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(LocalDateTime gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @Override
    public String toString() {
        return "Log{" +
            "id = " + id +
            ", logModule = " + logModule +
            ", logMethod = " + logMethod +
            ", logApi = " + logApi +
            ", logBrowser = " + logBrowser +
            ", logIp = " + logIp +
            ", logSystem = " + logSystem +
            ", logOperator = " + logOperator +
            ", logStatus = " + logStatus +
            ", gmtCreate = " + gmtCreate +
        "}";
    }
}
